package com.rgbgame.editor;

import processing.core.PApplet;

/**
 * 
 */

class EraserWidget extends UIDockWidget{

	/**
	 * 
	 */

	public EraserWidget(PApplet pApplet, float w, float h, UIDock p){
		super(pApplet, w,h,"Eraser",p);
		normalIcon = pApplet.loadImage("eraser.png");
		hoverIcon = normalIcon;    
		selectedIcon = pApplet.loadImage("eraser.png");
		selectedIcon.filter(PApplet.INVERT);
		selectedIcon.filter(PApplet.THRESHOLD);
	}

	public EraserWidget(PApplet pApplet, UIDock p){
		this(pApplet, p.dockWidth,p.dockWidth,p);
	}

	public void onSelect(){
		rgbEditor.toolType = rgbEditor.TOOL_ERASER;
		selectMe();
		mode = SELECTED;
	}
}